package by.semerikov.controlers;

import by.semerikov.exceptions.ApplicationException;
import by.semerikov.servlets.Command;
import by.semerikov.servlets.Result;

public abstract class Controller {
	public Result execute(Command command)throws ApplicationException
	{
		validate(command);
		return executeAfterValidation(command);
	}
	protected abstract void validate(Command command)throws ApplicationException;

	protected abstract Result executeAfterValidation(Command command) ;

}
